﻿@model HelpDeskTicketingApp.Models.AdmResolutionViewModel

@{
    ViewBag.Title = "Resolution";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Resolution</h2>
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
<div class="col-md-5">
    @using (Html.BeginForm(new { @id = "frmId", @class = "form-horizontal" }))
    {
        @Html.AntiForgeryToken()



        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(model => model.ResolutionId)



        <div class="form-group">

            @Html.LabelFor(model => model.IsResolved, (Model.IsResolved ? "Solved!" : "Staff Working on it"), new { @class = "form-control label " + (Model.IsResolved ? "label-success" : "label-warning") })
            <br /><br />
            Mark Solved / To be solved

            <select class="form-control" name="IsResolved">
                <option selected="@Model.IsResolved" value="True">Mark Solved</option>
                <option selected="@Model.IsResolved" value="False">To be solved</option>
            </select>
            
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ResolutionDesc)

            @Html.EditorFor(model => model.ResolutionDesc, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.ResolutionDesc, "", new { @class = "text-danger" })

        </div>

        <div class="form-group">

            @Html.LabelFor(model => model.Notes)

            @Html.EditorFor(model => model.Notes, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.Notes, "", new { @class = "text-danger" })

        </div>

        <div class="form-group">

            <input type="submit" value="Save" class="btn btn-default" />

        </div>

    }
</div>



@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    
    
}
